<?php
$today    = date('Y-m-d', time());
$contents = file_get_contents("./logs/{$today}.log");
$data     = [
    "dm_error"  => 0,
    "error_msg" => '',
    'data'      => [
        "content" => $contents,
    ],
];
header("Content-Type:application/json");
header('Access-Control-Allow-Origin:*');                        //支持全域名访问，不安全，部署后需要固定限制为客户端网址
header('Access-Control-Allow-Methods:POST,GET,OPTIONS,DELETE'); //支持的http 动作
echo json_encode($data);
